#!/usr/bin/python3

from urllib.parse import urlparse
import urllib.request
import re
import uapool

url = "https://www.xsbiquge.com/89_89726/"
urlObj = urlparse(url)
# print(urlObj.__dir__())
# print(urlObj._hostinfo)
# print(urlObj.hostname)
# print(urlObj.port)
# print(urlObj)
baseUrl = urlObj.scheme + "://" + urlObj.netloc
# print(baseUrl)
uapool.UA()
data = urllib.request.urlopen(url).read().decode("utf-8", "ignore")
# print(data)

pat = "<dd>.*?<a.*?href=\"(\\S*?)\".*?>.*?</a>"
result = re.compile(pat, re.S).findall(data)
# print(result)
for i in result:
    print(baseUrl + i)
